import store from '@/store'
const token = uni.getStorageSync('token')
const user = uni.getStorageSync('user')

console.log('permisson',token, user)
if (token && user) {
	store.commit('setToken', token)
	store.commit('setUser', user)
} else {
	console.log('else')
	store.commit('setToken', '')
	store.commit('setUser', null)
	
	console.log('navigateTo')
	uni.$u.route('/pages/login/login')
}

let cid

// #ifdef APP-PLUS
const clientInfo = plus.push.getClientInfo()
cid = clientInfo && clientInfo.clientid || ''
// #endif
// #ifdef H5
cid = '6200a6dbebce04a1f969efb069725d49'
// #endif

cid && store.commit('setClientId', cid)